#ifndef __C_VIEW_H__
#define __C_VIEW_H__
#include <windows.h>
#include "esUtil.h"
class CView
{
public:
	CView()
	{
		m_esContext = new ESContext;
	}
	static CView* GetInstance() 
	{
		if (!s_pInstance) 
		{
			s_pInstance = new CView();
		}
		return s_pInstance;
	}
	ESContext *m_esContext;
	GLboolean WinCreate (const char* title, int width, int height);
	LRESULT WINAPI WndProc ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
	void WinLoop();
	virtual void Render();
	void RefreshGL();
protected:
	char* m_Title;
	static CView* s_pInstance;
};
#endif